export const DISPLAY_TYPE = {
  PROPERTY: 'property',
  JSON: 'json',
}

export const ACTION_TYPE = {
  VIEW_PROPERTY: 'viewProperty',
  VIEW_JSON: 'viewJson',
  UPDATE_PROPERTY: 'updateProperty',
  UPDATE_JSON: 'updateJson',
  CREATE_FLOW: 'createFlow',
  CREATE_PROCESS: 'createProcess',
  CREATE_PROCESS_PROVIDER: 'createProcessProvider',
  CREATE_RESOURCE: 'createResource'
}




export const isCreateAction = (action) => {
  return [
    ACTION_TYPE.CREATE_FLOW,
    ACTION_TYPE.CREATE_PROCESS,
    ACTION_TYPE.CREATE_PROCESS_PROVIDER,
    ACTION_TYPE.CREATE_RESOURCE
  ].indexOf(action) != -1
}


export const isViewUpdateAction = (action) => {
  return [
    ACTION_TYPE.VIEW_PROPERTY,
    ACTION_TYPE.VIEW_JSON,
    ACTION_TYPE.UPDATE_PROPERTY,
    ACTION_TYPE.UPDATE_JSON].indexOf(action) != -1
}

export const DISPLAY_TYPE_NAME = "modalDisplayType"
